package com.atguigu;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

/**
 * @author 赵星
 * @version 1.0
 * @Date 2023/12/19 16:43
 */
public class MyTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        if (delegateTask.getName().equals("张三审批")) {
            delegateTask.setAssignee("zhangsan");
        }
        if (delegateTask.getName().equals("李四审批")) {
            delegateTask.setAssignee("lisi");
        }
    }
}
